spb/datacenterindex
Public
HTML 53.9%
TypeScript 44.5%
JavaScript 0.6%
SQL 0.5%
1"use client";23import { BarList, type BarListItem } from "@/components/ui/charts";4import { fmtInt, fmtMw } from "@/lib/format";56/** Server pages cannot pass `format` functions to the client BarList — pick the formatter by name here. */7export function CountBarList({ items, unit = "count", showRank = true, className }: { items: BarListItem[]; unit?: "count" | "mw"; showRank?: boolean; className?: string }) {8 return <BarList items={items} format={unit === "mw" ? (v) => fmtMw(v) : (v) => fmtInt(v)} showRank={showRank} className={className} />;9}10